package com.bugpool.leilema.tc.bean.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.sql.Timestamp;

/**
 * @Author wh
 * @Description 基础类
 * @Date 2023/6/8 9:58
 * @Version 1.0
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class BaseEntity {
    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    public Timestamp createTime;

    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间")
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    public Timestamp updateTime;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建人")
    @TableField(value = "create_user",fill = FieldFill.INSERT)
    public Long createUser;

    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新人")
    @TableField( value = "update_user",fill = FieldFill.INSERT)
    public Long updateUser;

    @ApiModelProperty(value = "备注")
    private String remark;

    /**
     * 0 未删除 1已经删除
     */
    @ApiModelProperty(value = "0 未删除 1已经删除")
    @TableField(value = "is_delete",fill = FieldFill.INSERT)
    public Integer isDelete;
}
